# -*- coding:utf-8 -*-
#2022/1/18 10:45
# author:xwl
from fastapi import APIRouter, Depends

from backend.app.app.api.api_Xiong.crud.pub_crud import eva_cal_output_save
from backend.app.app.api.api_Xiong.models.x_model import eva_cal_out_save
from backend.app.app.api.api_v1.user import verify_token_user
from backend.app.app.models.evaluate_calculate import Save_table_data

eva_cal_output = APIRouter(prefix="/eva_cal_output", tags=["单元方案评价指标计算输出数据"])

@eva_cal_output.post("/save",name="存库")
def save(datas:eva_cal_out_save, ver=Depends(verify_token_user)):
    result=eva_cal_output_save(datas.datas)
    return {
        'save_success':result,
        'verify': ver
    }